<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="${CONTEXT_PATH}/" />
<title>学生信息管理系统主界面</title>
	
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.1/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.1/themes/icon.css">
	<script type="text/javascript" src="js/jquery-easyui-1.4.1/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="js/jquery-easyui-1.4.1/locale/easyui-lang-zh_CN.js"></script>
    
    <script type="text/javascript">
    	$(function() {
    		var treeData = [{
    			text:"root",
    			children:[{
    				text:"班级信息管理",
    				attributes:{
    					url:"view/grade/gradeInfoMangement.jsp"
    				}
    			},{
    				text:"学生信息管理",
    				attributes:{
    					url:"view/student/studentInfoManagement.jsp"
    				}
    			}]
    		}];
    		$("#tree").tree({
    			data:treeData,
    			lines:true,
    			onClick:function(node) {
    				if(node.attributes) {
    					openTab(node.text, node.attributes.url);
    				}
    			}
    		});
    		function openTab(text, url) {
    			if($("#tabs").tabs('exists',text)) {
    				$("#tabs").tabs('select',text);
    			}else {
    				var content = "<iframe frameborder='0' scolling='auto' style='width:100%;height:100%;' src="+url+"></iframe>";
    				$("#tabs").tabs('add',{
    					title:text,
    					closable:true,
    					content:content
    				});
    			}
    		}
    	});
    </script>
</head>
<body class="easyui-layout">
	<div region="north" style="height: 80px;background-color: #E0EDFF">
		<div align="left" style="width: 80%;float: left"><img src="images/main.jpg"></div>
		<div style="padding-top: 50px;padding-right: 20px;">当前用户：&nbsp;<font color="red">${currentUser.get("userName") }</font></div>
	</div>
	<div region="center">
		<div class="easyui-tabs" fit="true" border="false" id="tabs">
			<div title="首页">
				<div align="center" style="padding-top: 100px;"><font color="red" size="10">welcome!</font> </div>
			</div>
		</div>
	</div>
	<div region="west" style="width: 150px;" title="导航菜单" split="true" >
		<ul id="tree"></ul>
	</div>
	<div region="south" style="25px;" align="center">copycat</div>

</body>
</html>